from django.db import models

class ImageFileModel(models.Model):
    uri = models.ImageField(upload_to='image', height_field='img_height',
                            width_field='img_width')

    type = models.CharField(max_length=10, blank=True)

    img_height = models.PositiveIntegerField(default=0)
    img_width = models.PositiveIntegerField(default=0)

    image_b64 = models.TextField(blank=True)

    class Meta:
        db_table = 'wch_storage_image_file'


class FileModel(models.Model):
    uri = models.FileField(upload_to='file')

    type = models.CharField(max_length=10, blank=True)

    class Meta:
        db_table = 'wch_storage_file'
